//
//  MainWindow.h
//  Editor
//
//  Created by Jeppe Nielsen on 10/19/14.
//  Copyright (c) 2014 Jeppe Nielsen. All rights reserved.
//

#pragma once

#include <QtWidgets/QMainWindow>
#include <QtCore/QtCore>
#include "ToolWindow.hpp"
#include <vector>
#include "ProjectWindow.hpp"
#include "Context.hpp"

class MainWindow : public QMainWindow {
    Q_OBJECT
    
public:
    void AddToolWindow(ToolWindow* toolWindow);

    void Initialize();
    
private slots:
    void NewProject();
    void Save();
    void Compile();
    void ProjectStep();
    void Update();
    
private:

    Context context;

    void CreateMenus();
    
    typedef std::vector<ToolWindow*> ToolWindows;
    ToolWindows toolWindows;
    
    QMenu* fileMenu;
    QAction* fileProjectNew;
    QAction* fileSave;
    
    QMenu* toolWindowsMenu;
    
    
    QMenu* gameMenu;
    QAction* gameCompile;
    QAction* gameStep;
    
    ProjectWindow projectWindow;
    
    void ProjectCreated(QString projectPath);
    
    QTimer timer;
    
};